/*
 * TareaService.java
 *
 * Created on 24 de enero de 2008, 06:52 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package perucuy.services;
import java.util.List;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import perucuy.dao.DAOFactory;
import perucuy.dao.AlertaDAO;
import perucuy.transfers.AlertaTO;
import perucuy.transfers.ParametroTO;
import static perucuy.utils.Funciones.esVacio;
/**
 *
 * @author OMATEO
 */
public class AlertaService {
    
    private static Logger log = Logger.getLogger(AlertaService.class);
    
    AlertaDAO dao = DAOFactory.getDAOFactory(DAOFactory.Tipo.SQLMAP).getAlertaDAO();
    
    public void registrarAlerta(AlertaTO alerta) {
        dao.create(alerta);
        log.debug("Guardo datos de la alerta");
    }
    
    public List getAlertas() {
        return dao.listado();
    }
    public List getAlertas(int campo, String valor) {
        return dao.listado(campo, valor);
    }
}
